/**
 * test.c  2014-05-03 16:10:55
 * anonymouse(anonymouse@email)
 *
 * Copyright (C) 2000-2014 All Right Reserved
 * 
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 *
 * Auto generate for Design Patterns in C
 */
#include <stdio.h>
#include <stdlib.h>

#include <mycommon.h>
#include <myobj.h>
#include <mytrace.h>
#include <test_suite.h>
#include "color_blue.h"
#include "color_red.h"
#include "shape_rectangle.h"
#include "shape_circle.h"

static int test_main_entry(char *output, size_t sz)
{
	_MY_TRACE_STR("test_main_entry\n");
	struct shape_rectangle *rect;
	struct color_blue *blue;

	blue = malloc(sizeof(*blue));
	if (!blue) return -1;
	color_blue_init(blue);

	rect = malloc(sizeof(*rect));
	if (!rect) return -1;
	shape_rectangle_init(rect, &blue->color);
	shape_draw(&rect->shape);
	shape_free(&rect->shape);

	return 0;
}

void main_entry_test(void);
void main_entry_test(void)
{
	my_test_suite_add(test_main_entry, "Test bridge_shape");
}
